home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / pibt40s2.arc / MAKEMEND.MOD < prev    next >
Text File  |  1986-03-23  |  5KB  |  73 lines

  1. (*----------------------------------------------------------------------*)
  2. (*        Make_And_Display_Menu --- Set up a menu and display it        *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. PROCEDURE Make_And_Display_Menu( VAR Menu     : Menu_Type;
  6.                                      Size     : INTEGER;
  7.                                      Row      : INTEGER;
  8.                                      Column   : INTEGER;
  9.                                      Width    : INTEGER;
  10.                                      Height   : INTEGER;
  11.                                      Default  : INTEGER;
  12.                                      Title    : AnyStr;
  13.                                      Texts    : AnyStr;
  14.                                      GenLet   : BOOLEAN;
  15.                                      Erase_It : BOOLEAN;
  16.                                  VAR Choice   : INTEGER );
  17.  
  18. (*----------------------------------------------------------------------*)
  19. (*                                                                      *)
  20. (*       Procedure:   Make_And_Display_Menu                             *)
  21. (*                                                                      *)
  22. (*       Purpose:     Set up a menu and display it                      *)
  23. (*                                                                      *)
  24. (*       Calling Sequence:                                              *)
  25. (*                                                                      *)
  26. (*          Make_And_Display_Menu( VAR Menu     : Menu_Type;            *)
  27. (*                                     Size     : INTEGER;              *)
  28. (*                                     Row      : INTEGER;              *)
  29. (*                                     Column   : INTEGER;              *)
  30. (*                                     Width    : INTEGER;              *)
  31. (*                                     Height   : INTEGER;              *)
  32. (*                                     Default  : INTEGER;              *)
  33. (*                                     Title    : AnyStr;               *)
  34. (*                                     Texts    : AnyStr;               *)
  35. (*                                     GenLet   : BOOLEAN;              *)
  36. (*                                     Erase_It : BOOLEAN;              *)
  37. (*                                 VAR Choice   : INTEGER );            *)
  38. (*                                                                      *)
  39. (*             Menu     --- Menu to be initialized                      *)
  40. (*             Size     --- Number of entries in menu                   *)
  41. (*             Row      --- Row position of upper left hand corner      *)
  42. (*             Column   --- Column position of upper left hand corner   *)
  43. (*             Width    --- Width of menu                               *)
  44. (*             Height   --- Height of menu                              *)
  45. (*             Default  --- Default entry for menu                      *)
  46. (*             Title    --- Title for menu                              *)
  47. (*             Texts    --- Texts of menu item entries, each ended by a *)
  48. (*                          semicolon.                                  *)
  49. (*             GenLet   --- Add x) to front of each menu item.          *)
  50. (*             Erase_It --- TRUE to erase menu after displaying it      *)
  51. (*             Choice   --- resultant choice                            *)
  52. (*                                                                      *)
  53. (*       Calls:                                                         *)
  54. (*                                                                      *)
  55. (*          Make_A_Menu                                                 *)
  56. (*          Menu_Display_Choices                                        *)
  57. (*          Menu_Get_Choice                                             *)
  58. (*                                                                      *)
  59. (*----------------------------------------------------------------------*)
  60.  
  61. BEGIN (* Make_And_Display_Menu *)
  62.                                    (* Set up menu *)
  63.  
  64.    Make_A_Menu( Menu, Size, Row, Column, Width, Height, Default,
  65.                 Title, Texts, GenLet );
  66.  
  67.                                    (* Display menu *)
  68.    Menu_Display_Choices( Menu );
  69.                                    (* Get choice *)
  70.  
  71.    Choice := Menu_Get_Choice( Menu , Erase_It );
  72.  
  73. END   (* Make_And_Display_Menu *);